import { getCart } from '@/network/cart.js'

const actions = {
  // 发情请求，更新购物车的商品数量
  async updateCart(context) {
    const data = await getCart()
    context.commit('addCart', {count: data.data.length || 0})
  }
}

export default actions